import 'package:flutter_test/flutter_test.dart';
import 'package:audio_waveforms/audio_waveforms.dart';
import 'package:audio_waveforms/audio_waveforms_platform_interface.dart';
import 'package:audio_waveforms/audio_waveforms_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockAudioWaveformsPlatform
    with MockPlatformInterfaceMixin
    implements AudioWaveformsPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final AudioWaveformsPlatform initialPlatform = AudioWaveformsPlatform.instance;

  test('$MethodChannelAudioWaveforms is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelAudioWaveforms>());
  });

  test('getPlatformVersion', () async {
    AudioWaveforms audioWaveformsPlugin = AudioWaveforms();
    MockAudioWaveformsPlatform fakePlatform = MockAudioWaveformsPlatform();
    AudioWaveformsPlatform.instance = fakePlatform;

    expect(await audioWaveformsPlugin.getPlatformVersion(), '42');
  });
}
